package org.sdau.rotten.library.dao;

import org.sdau.rotten.library.entity.Book;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface BookDAO {
    List<Book> queryChart(int bookNum);

    Book queryById(int id);

    List<Book> queryAll(@Param("offset") int offset, @Param("limit") int limit);

    int reduceNumber(long bookId);

    int deleteBook(int bookId);

    int addNumber(int number, long bookId);

    int insert(int bookId, String bookName, int bookNum);

    int update(int bookId, String bookName, int bookNum);

    int deleteAppoint(int bookId, int studentId);

    int addOneBook(long bookId);

    List<Book> search(String bookName);

    List<Book> userWord();


}
